<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>{% block title %}{% endblock %}</title>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <link rel='stylesheet' href='/components/nprogress/nprogress.css'/>
  <link rel="stylesheet" href="/components/bootstrap/dist/css/bootstrap.min.css"/>
  <link rel="stylesheet" href="/components/font-awesome/css/font-awesome.min.css">
  <link rel="stylesheet" href="/components/Ionicons/css/ionicons.min.css">
  <link rel="stylesheet" href="/dist/css/AdminLTE.min.css">
  <link rel="stylesheet" href="/dist/css/skins/_all-skins.min.css">
  <link rel="stylesheet" href="/components/bootstrap3-dialog/dist/css/bootstrap-dialog.min.css">
  <style>
    #nprogress .bar{
      /*background: #29d;*/
      background:#cc00cc;
    }
    .bootstrap-dialog .modal-header{
      border-top-left-radius:0px;
      border-top-right-radius:0px;
    }
  </style>
  <script src="/components/jquery/dist/jquery.min.js"></script>
  <script src="/components/bootstrap/dist/js/bootstrap.min.js"></script>
  <script src="/dist/js/app.min.js"></script>
  <script src="/dist/js/general.js"></script>
  <script src="/plugins/slimScroll/jquery.slimscroll.min.js"></script>
  <script src="/plugins/pjax/jquery.pjax.js"></script>
  <script src='/components/nprogress/nprogress.js'></script>
  <script src="/components/bootstrap3-dialog/dist/js/bootstrap-dialog.min.js"></script>
  <script src="/dist/js/common.js"></script>
  <!-- DataTables -->
  <link rel="stylesheet" href="/components/datatables/media/css/dataTables.bootstrap.min.css">
  <!-- DataTables -->
  <script src="/plugins/datatables/jquery.dataTables.js"></script>
  <script src="/components/datatables/media/js/dataTables.bootstrap.min.js"></script>
  <!-- iCheck Css -->
  <link rel="stylesheet" href="/components/icheck/skins/all.css">
  <!-- iCheck Js -->
  <script src="/components/icheck/icheck.min.js"></script>
  <link href="/dist/css/BigCMSEdit.css" rel="stylesheet">
  <!-- bootstrap-validation -->
  <link href="/components/form.validation/dist/css/formValidation.css" rel="stylesheet">
  <script src="/components/form.validation/dist/js/formValidation.js"></script>
  <script src="/components/form.validation/dist/js/framework/bootstrap.js"></script>
  <script>
    //window.UEDITOR_HOME_URL = "127.0.0.1:3000/plugins/ueditor/";
    String.prototype.format = function(){
      var args = arguments;
      return this.replace(/\{(\d+)\}/g,
      function(m,i){
          return args[i];
      });
    }
    Date.prototype.format = function(format){ 
      var o = { 
        "M+" : this.getMonth()+1, //month 
        "d+" : this.getDate(), //day 
        "h+" : this.getHours(), //hour 
        "m+" : this.getMinutes(), //minute 
        "s+" : this.getSeconds(), //second 
        "q+" : Math.floor((this.getMonth()+3)/3), //quarter 
        "S" : this.getMilliseconds() //millisecond 
      }
      if(/(y+)/.test(format)) { 
        format = format.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length)); 
      }

      for(var k in o) { 
        if(new RegExp("("+ k +")").test(format)) { 
          format = format.replace(RegExp.$1, RegExp.$1.length==1 ? o[k] : ("00"+ o[k]).substr((""+ o[k]).length)); 
        } 
      } 
      return format; 
    };
    function pjaxGo(href){
      $('#pjax').attr('href',href).click();
    }
    $(function(){
      NProgress.configure({ speed: 500,showSpinner:false });

      $.pjax({
        selector: "a:not([href^='javascript:'][href!='#'])",
        container: '#content', //内容替换的容器
        show: 'fade',  //展现的动画，支持默认和fade, 可以自定义动画方式，这里为自定义的function即可。
        cache: false,  //是否使用缓存
        storage: false,  //是否使用本地存储
        titleSuffix: '', //标题后缀
        filter: function(){},
        callback: function(status){
          var type = status.type;
          switch(type){
              case 'success': ;break; //正常
              case 'cache':;break; //读取缓存 
              case 'error': ;break; //发生异常
              case 'hash': ;break; //只是hash变化
          }
        }
      });
    });
  </script>
  {% block head %}
  {% endblock %}
</head>
<body class="hold-transition skin-blue sidebar-mini">
  <div style="display:none;" name='pjaxArea'><a href='/' id='pjax'></a></div>
<div class="wrapper">
  <header class="main-header">
    <a href="/" class="logo">
      <span class="logo-mini"><b>B</b>ig</span>
      <span class="logo-lg"><b>Big</b>CMS</span>
    </a>
    <nav class="navbar navbar-static-top">
      <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
        <span class="sr-only">Toggle navigation</span>
      </a>
      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
          <li class="dropdown user user-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <img src="/dist/img/user2-160x160.jpg" class="user-image" alt="User Image">
              <span class="hidden-xs">人员名称</span>
            </a>
            <ul class="dropdown-menu">
              <li class="user-header">
                <img src="/dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
                <p>
                  人员名称
                  <small>小描述</small>
                </p>
              </li>
              <li class="user-footer">
                <div class="pull-right">
                  <a href="#" class="btn btn-danger btn-flat">退出</a>
                </div>
              </li>
            </ul>
          </li>
        </ul>
      </div>
    </nav>
  </header>
  <aside class="main-sidebar">
    <section class="sidebar">
      <div class="user-panel">
        <div class="pull-left image">
          <img src="/dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
        </div>
        <div class="pull-left info">
          <p>人员名称</p>
          <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
        </div>
      </div>
      <ul class="sidebar-menu">
        <li class="header">菜单</li>
        {% for item in parentMenus -%}
        <li class="treeview">
        <a href="javascript:void(0);">
          <i class="fa {{ item.icon }}"></i><span>{{ item.title }}</span>
          <span class="pull-right-container">
            <i class="fa fa-angle-left pull-right"></i>
          </span>
        </a>
        <ul class="treeview-menu">
        {% for subitem in item.menus -%}
          <li><a href="{{subitem.url}}"><i class="{{subitem.icon}}"></i>{{subitem.title}}</a></li>
        {%- endfor %}
        </ul>
        </li>
        {%- endfor %}
      </ul>
    </section>
  </aside>

  <div class="content-wrapper">
    <section class="content-header">
      <h1>
        标题
        <small>小标题</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> 当前</a></li>
        <li class="active">面板</li>
      </ol>
    </section>
    <section class="content" id="content">
    {% block content %}
    {% endblock %}
    </section>

  </div>
  <footer class="main-footer">
    <div class="pull-right hidden-xs">
      <b>Version</b> 2.3.7
    </div>
    <strong>页脚</strong>
  </footer>
</div>
</body>
</html>